<?php /* Smarty version 2.6.18, created on 2008-06-12 23:41:39
         compiled from admin/Websetup_user_list.html */ ?>
<table id="userList">
<thead>
<tr id="tr_0">
	<th colspan="2">用户列表</th>
	<td colspan="3">
		<select id="select_ug_id">
			<option value="">全部用户</option>
		<?php unset($this->_sections['i']);
$this->_sections['i']['name'] = 'i';
$this->_sections['i']['loop'] = is_array($_loop=$this->_tpl_vars['ugList']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['i']['show'] = true;
$this->_sections['i']['max'] = $this->_sections['i']['loop'];
$this->_sections['i']['step'] = 1;
$this->_sections['i']['start'] = $this->_sections['i']['step'] > 0 ? 0 : $this->_sections['i']['loop']-1;
if ($this->_sections['i']['show']) {
    $this->_sections['i']['total'] = $this->_sections['i']['loop'];
    if ($this->_sections['i']['total'] == 0)
        $this->_sections['i']['show'] = false;
} else
    $this->_sections['i']['total'] = 0;
if ($this->_sections['i']['show']):

            for ($this->_sections['i']['index'] = $this->_sections['i']['start'], $this->_sections['i']['iteration'] = 1;
                 $this->_sections['i']['iteration'] <= $this->_sections['i']['total'];
                 $this->_sections['i']['index'] += $this->_sections['i']['step'], $this->_sections['i']['iteration']++):
$this->_sections['i']['rownum'] = $this->_sections['i']['iteration'];
$this->_sections['i']['index_prev'] = $this->_sections['i']['index'] - $this->_sections['i']['step'];
$this->_sections['i']['index_next'] = $this->_sections['i']['index'] + $this->_sections['i']['step'];
$this->_sections['i']['first']      = ($this->_sections['i']['iteration'] == 1);
$this->_sections['i']['last']       = ($this->_sections['i']['iteration'] == $this->_sections['i']['total']);
?>
			<option id="s_<?php echo $this->_tpl_vars['ugList'][$this->_sections['i']['index']]['user_group_id']; ?>
" value="<?php echo $this->_tpl_vars['ugList'][$this->_sections['i']['index']]['user_group_id']; ?>
" ugname="<?php echo $this->_tpl_vars['ugList'][$this->_sections['i']['index']]['group_name']; ?>
"><?php echo $this->_tpl_vars['ugList'][$this->_sections['i']['index']]['levelstr']; ?>
 <?php echo $this->_tpl_vars['ugList'][$this->_sections['i']['index']]['group_name']; ?>
</option>
		<?php endfor; endif; ?>
		</select>
	</td>
	<td colspan="4"><a id="linkUserCreate" href="#">添加新用户</a></td>
</tr>
</thead>
<tr id="headline">
	<th></th>
	<th>用户名</th>
	<th>E-mail</th>
	<th>状态</th>
	<th>上次登录</th>
	<th colspan="4">操作</th>
</tr>
<?php unset($this->_sections['i']);
$this->_sections['i']['name'] = 'i';
$this->_sections['i']['loop'] = is_array($_loop=$this->_tpl_vars['userList']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['i']['show'] = true;
$this->_sections['i']['max'] = $this->_sections['i']['loop'];
$this->_sections['i']['step'] = 1;
$this->_sections['i']['start'] = $this->_sections['i']['step'] > 0 ? 0 : $this->_sections['i']['loop']-1;
if ($this->_sections['i']['show']) {
    $this->_sections['i']['total'] = $this->_sections['i']['loop'];
    if ($this->_sections['i']['total'] == 0)
        $this->_sections['i']['show'] = false;
} else
    $this->_sections['i']['total'] = 0;
if ($this->_sections['i']['show']):

            for ($this->_sections['i']['index'] = $this->_sections['i']['start'], $this->_sections['i']['iteration'] = 1;
                 $this->_sections['i']['iteration'] <= $this->_sections['i']['total'];
                 $this->_sections['i']['index'] += $this->_sections['i']['step'], $this->_sections['i']['iteration']++):
$this->_sections['i']['rownum'] = $this->_sections['i']['iteration'];
$this->_sections['i']['index_prev'] = $this->_sections['i']['index'] - $this->_sections['i']['step'];
$this->_sections['i']['index_next'] = $this->_sections['i']['index'] + $this->_sections['i']['step'];
$this->_sections['i']['first']      = ($this->_sections['i']['iteration'] == 1);
$this->_sections['i']['last']       = ($this->_sections['i']['iteration'] == $this->_sections['i']['total']);
?>
<tr id="tr_<?php echo $this->_tpl_vars['userList'][$this->_sections['i']['index']]['member_id']; ?>
">
	<td><input type="checkbox" /></td>
	<td><?php echo $this->_tpl_vars['userList'][$this->_sections['i']['index']]['username']; ?>
</td>
	<td><?php echo $this->_tpl_vars['userList'][$this->_sections['i']['index']]['email']; ?>
</td>
	<td class="blocked"><?php echo $this->_tpl_vars['userList'][$this->_sections['i']['index']]['is_blocked']; ?>
</td>
	<td class="login_at"><?php echo $this->_tpl_vars['userList'][$this->_sections['i']['index']]['last_login_at']; ?>
</td>
	<td><a href="#" onclick="userUpdate( <?php echo $this->_tpl_vars['userList'][$this->_sections['i']['index']]['member_id']; ?>
, '<?php echo $this->_tpl_vars['userList'][$this->_sections['i']['index']]['username']; ?>
', '<?php echo $this->_tpl_vars['userList'][$this->_sections['i']['index']]['email']; ?>
', '<?php echo $this->_tpl_vars['userList'][$this->_sections['i']['index']]['user_group']['user_group_id']; ?>
', '<?php echo $this->_tpl_vars['userList'][$this->_sections['i']['index']]['user_group']['group_name']; ?>
' );">修改</a></td>
	<td><a class="linkUserRemove" member_id="<?php echo $this->_tpl_vars['userList'][$this->_sections['i']['index']]['member_id']; ?>
" href="#">删除</a></td>
	<td>
		<a class="block_switch" member_id="<?php echo $this->_tpl_vars['userList'][$this->_sections['i']['index']]['member_id']; ?>
" href="#"><?php if ($this->_tpl_vars['userList'][$this->_sections['i']['index']]['is_blocked']): ?>启用<?php else: ?>禁用<?php endif; ?></a>
	</td>
	<td>
		<a href="?controller=admin_user&action=band&member_id=<?php echo $this->_tpl_vars['userList'][$this->_sections['i']['index']]['member_id']; ?>
">绑定</a>
	</td>
</tr>
<?php endfor; endif; ?>
<tfoot>
<tr>
	<td colspan="9">
		<a href="#" id="selectAll">全选</a> / 
		<a href="#" id="unselectAll">全部不选</a>
		<label>选定项：</label>
	</td>
</tr>
</tfoot>
</table>

<!-- 修改用户的表单/隐藏状态 -->
<div id="divUserCRUD" class='hideme'>

<form id="formUserUpdate" action="?controller=admin_user&action=userupdate" method="POST">
	<table>
		<tr>
			<th>ID:</th>
			<td>
				<input id='u_member_id' name='member_id' type='text' readonly='readonly' size='4' /> * 不可修改
			</td>
		</tr>
		<tr>
			<th>用户组:</th>
			<td><select id="u_select_user_group" name="user_group_id"></select></td>
		</tr>
		<tr>
			<th>用户名:</th>
			<td>
				<input id='u_username' name='username' type='text' size='20' class='required' 
				title='用户名不能为空' alt="{event: 'blur'}" maxlength="16"/>
			</td>
		</tr>
		<tr>
			<th>新密码:</th>
			<td>
				<input id='u_password' name='password' type='password' size='20' maxlength="16"/> * 不修改请留空
			</td>
		</tr>
		<tr>
			<th>Email:</th>
			<td>
				<input id='u_email' name='email' type='text' size='50' class='required email'
				title='请正确填写电子邮件' alt="{event: 'blur'}" maxlength="64" />
			</td>
		</tr>
		<tr>
			<th></th>
			<td>
				<input type='submit' value='修改' class='submitbutton' />
				<input type='button' value='取消' class='submitbutton' onclick='_removeModifyForm();' />
			</td>
		</tr>
	</table>
</form>

<form id="formUserCreate" action="?controller=admin_user&action=usercreate" method="POST">
	<table>
		<tr>
			<th><input id='c_user_group_id' name='user_group_id' type="hidden" value="" /></th>
			<td>在<span id='span_user_group_id'></span>中添加用户</td>
		</tr>
		<tr>
			<th>用户名:</th>
			<td>
				<input id='c_username' name='username' type='text' size='20' class='required' 
				title='用户名不能为空' alt="{event: 'blur'}" maxlength="16"/>
			</td>
		</tr>
		<tr>
			<th>密码:</th>
			<td>
				<input id='c_password' name='password' type='password' size='20' maxlength="16"/>
			</td>
		</tr>
		<tr>
			<th>Email:</th>
			<td>
				<input id='c_email' name='email' type='text' size='50' class='required email'
				title='请正确填写电子邮件' alt="{event: 'blur'}" maxlength="64" />
			</td>
		</tr>
		<tr>
			<th></th>
			<td>
				<input type='submit' value='创建新用户' class='submitbutton' />
				<input type='button' value='取消' class='submitbutton' onclick='_removeModifyForm();' />
			</td>
		</tr>
	</table>
</form>

</div>


